﻿using AutoMapper;
using Grand.Domain.Customers;
using Grand.Infrastructure.Mapper;
using Grand.Web.Admin.Models.Customers;

namespace Grand.Web.Admin.Mapper;

public class UserApiProfile : Profile, IAutoMapperProfile
{
    public UserApiProfile()
    {
        CreateMap<UserApi, UserApiModel>()
            .ForMember(dest => dest.Password, mo => mo.Ignore());
        CreateMap<UserApiModel, UserApi>()
            .ForMember(dest => dest.Password, mo => mo.Ignore())
            .ForMember(dest => dest.Id, mo => mo.Ignore());

        CreateMap<UserApiCreateModel, UserApi>();
    }

    public int Order => 0;
}